In semiconductor lithography, it is useful to inspect and monitor photo masks (also referred to as reticles) and semiconductor wafers having circuits printed on the wafers based on the patterns on the photo masks. In some examples, images of portions of a photo mask currently being used for production of semiconductor circuits are compared to images of portions of a reference photo mask, and differences between the images are analyzed. In some examples, the photo mask has several regions with repeating patterns, each region having a pattern for one die, and the image of a region is compared to the image of another region of the same photo mask. Similarly, a production semiconductor wafer can be inspected by comparing images of dies on the production wafer with images of dies on a reference wafer, or an image of a die can be compared to the image of another die on the same wafer. The measurements of the photo masks and wafers can be used to generate information about the type and number of defects on the photo mask and wafer, which is useful for quality control.